{SYSTEM: TSM MR Gap System }
{ Copyright 2011. PJ Kaufman. All rights reserved. }

		
	Inputs:	upwardsgap(2.25), downwardsgap(1.90), hold(1);
	vars:		gap(0);
	
	gap = close/close[1] - 1;
	
	If Barssinceentry >= hold then begin
		If Marketposition > 0 then sell all shares this bar on close
			Else if marketposition < 0 then buy to cover all shares this bar on close;
		end;
		
	If gap >= upwardsgap/100 then buy 1 share this bar on close
		Else if gap <= - downwardsgap/100 then sell short 1 share this bar on close;
	